package com.ds.infra.mq.core.config;

import com.ds.infra.mq.core.constants.MQConstant;
import lombok.Data;

/**
 * 作用：Broker配置类
 *
 * @author WeiShaoying
 */
@Data
public class BrokerConfig {

    private String brokerId = "ds-broker";

    private int port = MQConstant.DEFAULT_PORT;

    private int maxMessageSize = 1024 * 1024; // 1MB

    private int ioThreads = Runtime.getRuntime().availableProcessors();

    private int workerThreads = Runtime.getRuntime().availableProcessors() * 2;
}
